package fr.utbm.aiechat;

import android.app.Activity;

public class LocalisationData {
	private double lat = 0;
	private double lng = 0;
	public Activity MyActivity;
	private static LocalisationData instance;
	
	public void setLat(double lat) {
		this.lat = lat;
	}
	public void setLng(double lng) {
		this.lng = lng;
	}
	
	public double getLat() {
		//if(Settings.getInstance().getPermissionGPS()){
			return lat;
		//}
		//return 0;
	}

	public double getLng() {
		//if(Settings.getInstance().getPermissionGPS()){
			return lng;
		//}
		//return 0;
	}

	
	
	protected LocalisationData(Activity MyActivity)
	{
		this.MyActivity = MyActivity;
	}
	

	// Singleton Pattern
	public static LocalisationData getInstance()
	{
		return instance;
	}
	
	// Singleton Pattern
	public static LocalisationData createInstance(Activity MyActivity)
	{
		if(instance == null)
		{
			instance = new LocalisationData(MyActivity);
		}
		return instance;
	}
}
